
package com.macro.mall.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;

/**
 * @Author：Minxiao-Hao
 * @Description: 商品物品信息导入导出
 * @name：Pmsitem
 * @Date：2024/11/2 9:56
 */
@Data
public class PmsItemExcel {

    @ExcelProperty("物品名称")
    private String itemName;

    @ExcelProperty("物品别名")
    private String itemAlias;

    @ExcelProperty("物品编号")
    private String itemCarId;

    @ExcelProperty("物品价格")
    private BigDecimal itemPrice;

    @ExcelProperty("物品状态")
    private Long itemStatus;

    @ExcelProperty("物品类型名称")
    private String typeName;

    @ExcelProperty("物品数量")
    private Integer itemCount;
    @ExcelProperty("物品图片")
    private String itemPic;

    public PmsItem toItem() {
        PmsItem pmsItem = new PmsItem();
        BeanUtils.copyProperties(this, pmsItem);
        return pmsItem;
    }
}
